1. Technical Field
Present invention embodiments relate to merging of documents, and more specifically, to updating information within a target Extended Markup Language (XML) document based on content of an update document (containing modified target document data) in a manner complying with the schema of the target XML document.
2. Discussion of the Related Art
XML schemas are frequently used to define a required format and structure for XML documents. Updates or modifications for the XML documents can be represented as update messages or documents. An update document can be utilized to modify a corresponding existing or target XML document, and may include new values for elements/attributes in the target document, and/or new elements, attributes, or document fragments to be inserted into the target document. In addition, the update document may flag elements, attributes, or document fragments for deletion from the target document.
When merging the update and target documents, which can include inserting elements from the update document into the target document, all modifications to the target document need to be applied in such a manner that the modified target document complies with a given XML schema to maintain data integrity. The determination of a corresponding insert location in the target document for the modifications is a non-trivial task and needs to maintain compliance with the XML schema.